<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <title>Document</title>
</head>
<div id="app">
    <p>当前时间方法：{{getCurrentTime()}}</p>
    <p>当前时间属性：{{getCurrentTime1}}</p>
</div>
<script>
    let app = new Vue({
        el: "#app",
        methods: {
            getCurrenTime: function () {
                return Date.now();
            }
        },
        // 计算属性
        computed: {
            getCurrentTime1: function () {
                return Date.now();
            }
        }
    })
</script>
</body>

</html>